LGF_ConvertTemperature (FC / 3.0.1)

Overview

Author: Siemens Digital Industry Support

Short description

This function converts a temperature value from one into another unit by using an appropriate given mode parameter.

Block Interface

LGF_ConvertTemperature (FC)
Int  mode Ret_Val  Real
    
Real  value error  Bool
    
   status  Word
    
   

Input parameter

IdentifierData type Description
modeInt 1: Celsius to Fahrenheit,
2: Fahrenheit to Celsius,
3: Celsius to Kelvin,
4: Kelvin to Celsius,
5: Fahrenheit to Kelvin,
6: Kelvin in Fahrenheit,
7: Rankine to Kelvin,
8: Kelvin to Rankine
valueReal Temperature value to be converted

Output parameter

IdentifierData type Description
Ret_ValReal Converted temperature result
errorBool FALSE: No error
TRUE: An error occurred during the execution of the FB
statusWord 16#0000-16#7FFF: Status of the FB
16#8000-16#FFFF: Error identification (see following Table)

Status & Error codes

Code / ValueIdentifier / Description
16#8200ERR_WRONG_MODE
Error: Incorrect mode on input “mode”, see description of the input parameters

Change log

Version & DateChange description
1.0.0Siemens Industry Online Support
19.08.2015First released version
1.0.1Siemens Industry Online Support
02.01.2017Upgrade: TIA Portal V14 Update 1
1.0.2Siemens Industry Online Support
17.08.2018Upgrade: TIA V15 Update 2
1.0.3Siemens Industry Online Support
23.11.2018Upgrade: TIA V15.1
2.0.0Simatic Systems Support
16.12.2018Rename from "LGF_TemperatureConvert" to "LGF_ConvertTemperature"
to start with the verb
include the Rankine conversion
Code refactoring, regions, commends and constants
3.0.0Simatic Systems Support
23.04.2020Set version to V3.0.0
harmonize the version of the whole library
3.0.1Simatic Systems Support
22.02.2021Insert documentation